package cn.liontalk.consumer;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

/**
 * @author: 周哲
 * @package: cn.liontalk.consumer
 * @description:
 * @date: 2019/1/10 20:35
 * @version: V1.0
 */
@Component
@RabbitListener(
        bindings = @QueueBinding(value = @Queue(value = "${mq.config.queue.push}",autoDelete = "true"),
        exchange = @Exchange(value = "${mq.config.exchange}",type= ExchangeTypes.FANOUT)
        )
)
public class PushConsumer {
    @RabbitHandler
    public void receiveMessage(String message){
        System.out.println("Push Consumer..." +message);
    }
}
